package com.situ.mvc.service.impl;

import java.util.List;

import com.situ.mvc.dao.impl.IBanjiDaoimpl;
import com.situ.mvc.entity.Banji;
import com.situ.mvc.mapper.IBanjiDao;
import com.situ.mvc.service.IBanjiService;

public class Banjiserviceimpl implements IBanjiService {
	private IBanjiDao banjiDao = new IBanjiDaoimpl();
	@Override
	public List<Banji> selectAll() {
		// 体现Service业务逻辑，给所有学生名字前面加上"Java1907"
		List<Banji> list = banjiDao.selectAll();
		for (Banji banji : list) {
			String name = banji.getName();
			banji.setName("Java1907-" + name);
		}
		
		return list;
	}

	@Override
	public List<Banji> selectByName(String name) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean insert(Banji banji) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean update(Banji banji) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteById(Integer id) {
		int count = banjiDao.deleteById(id);

		 
		

		 
		 
		return count == 1 ? true : false;
	}	

}